#!/bin/bash

./gpio clear 438
eeprom_path="/sys/class/i2c-dev/i2c-0/device/0-0050/eeprom"
echo "BEAGLEV-AHEAD-A0" > $eeprom_path
#cat $eeprom_path
cat $eeprom_path | grep BEAGLEV-AHEAD-A0
status=$?
./gpio set 438
#echo $status
[ $status -eq 0 ] && { echo "EEPROM Write OK"; ./gpio clear 483; exit 0; }
echo "EEPROM Write FAIL"
exit 2
